/**
 * 
 */
package com.zxc.qlexpress4;

import java.util.HashMap;
import java.util.Map;

import com.alibaba.qlexpress4.Express4Runner;
import com.alibaba.qlexpress4.InitOptions;
import com.alibaba.qlexpress4.QLOptions;
import com.alibaba.qlexpress4.QLResult;

/**
 * @author Administrator
 *
 */
public class QLexpress4Demo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Express4Runner runner = new Express4Runner(InitOptions.DEFAULT_OPTIONS);
		Map<String, Object> context = new HashMap<String, Object>();
		context.put("a", 1);
		context.put("b", 2);
		context.put("c", 3);
		String express = "a + b * c";
		QLResult r = runner.execute(express, context, QLOptions.DEFAULT_OPTIONS);
		System.out.println(r.getResult());
	}

}
